/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2023-10-30
 * Time: 20:59
 */
class Student {
    public String name;
    public int age;

    public static String classRoom;

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
        // classRoom = "201";
    }

    /*static {
        classRoom = "301";
    }*/

}


public class Test {
    public static void main(String[] args) {
        // Student student = new Student("zhangsan", 18);
        System.out.println(Student.classRoom);
        // String
    }
}

/*
public class Person {
    String name;
    String gender;
    int age;
    public Person(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        如果想要默认打印对象中的属性该如何处理呢？答案：重写toString方法即可。
    }
    public static void main(String[] args) {
        Person person = new Person("Jim","男", 18);
        System.out.println(person);
    }
*/

/*public class Person {
    String name;
    String gender;
    int age;
    public Person(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }
    @Override
    public String toString() {
        return "[" + name + "," + gender + "," + age + "]";
    }
    public static void main(String[] args) {
        Person person = new Person("Jim","男", 18);
        System.out.println(person);
    }
}*/
